<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8" isELIgnored="false"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!-- 
	静态资源文件.css，.js和图片的代码路径可能会报错，
	错误一般是Failed to load resource: the server responded with a status of 404 ()，
	404错误基本上都是路径问题，
	但是一般登录进去系统后重新退出就没事了
	
	本次课程设计并不完美，有个别地方可能会有bug，
	如果遇到bug请找完成本次课程设计的陈梓锋。
	还有就是数据库方面的问题，我已经将tallyform和user这两个数据库表打包在doc文件，
	你可以把.sql文件拖到桌面双击运行，前提是你已经配置好数据库相关的环境和相关软件，
	数据库软件我用的是HeidiSQL，请自行到官网下载。
	里面有我对本次课程设计的各方面功能的介绍。
	
 -->
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>记账功能</title>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>广州城市理工学院</title>
<meta name="description" content="这是一个 index 页面">
<meta name="keywords" content="index">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="renderer" content="webkit">
<meta http-equiv="Cache-Control" content="no-siteapp" />
<link rel="icon" type="image/png" href="assets/i/index.ico">
<link rel="apple-touch-icon-precomposed"
	href="assets/i/app-icon72x72@2x.png">
<meta name="apple-mobile-web-app-title" content="Amaze UI" />
<script src="assets/js/echarts.min.js"></script>
<link rel="stylesheet" href="assets/css/amazeui.min.css" />
<link rel="stylesheet" href="assets/css/amazeui.datatables.min.css" />
<link rel="stylesheet" href="assets/css/app.css">
<script src="assets/js/jquery.min.js"></script>
<link
	href="//netdna.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"
	rel="stylesheet">

</head>

<body data-type="widgets">
	<script src="assets/js/theme.js"></script>
	<div class="am-g tpl-g">
		<!-- 头部 -->
		<header>
			<!-- logo -->
			<div class="am-fl tpl-header-logo">
				<a href="javascript:;"><h2>个人记账系统</h2></a>
			</div>
			<!-- 右侧内容 -->
			<div class="tpl-header-fluid">
				<!-- 侧边切换 -->
				<div class="am-fl tpl-header-switch-button am-icon-list">
					<span> </span>
				</div>

				<!-- 其它功能-->
				<div class="am-fr tpl-header-navbar">
					<ul>
						<!-- 欢迎语 -->
						<li class="am-text-sm tpl-header-navbar-welcome"><a
							href="javascript:;">欢迎你, <c:forEach items="${userlist}"
									var="user">
									<span> 姓名: ${user.username}</span>
									<span> 学号: ${user.number}</span>
									<span> 序号: ${user.id}</span>
									<span> 班别: ${user.stuclass}</span>
									<span> 性别: ${user.sex}</span>
									<span>出生日期: ${user.birth}</span>
								</c:forEach>

						</a></li>



						<!-- 退出 -->
						<li class="am-text-sm"><a href="logoutServlet"
							onclick="if(confirm('是否退出帐号'+'${username}'+'?')==false)return false">
								<span class="am-icon-sign-out"></span> 退出
						</a></li>
					</ul>
				</div>
			</div>

		</header>
		<!-- 风格切换 -->
		<div class="tpl-skiner">
			<div class="tpl-skiner-toggle am-icon-cog"></div>
			<div class="tpl-skiner-content">
				<div class="tpl-skiner-content-title">选择主题</div>
				<div class="tpl-skiner-content-bar">
					<span class="skiner-color skiner-white" data-color="theme-white"></span>
					<span class="skiner-color skiner-black" data-color="theme-black"></span>
				</div>
			</div>
		</div>
		<!-- 侧边导航栏 -->
		<div class="left-sidebar">
			<!-- 用户信息 -->
			<div class="tpl-sidebar-user-panel">
				<div class="tpl-user-panel-slide-toggleable">
					<div class="tpl-user-panel-profile-picture">
						<img src="assets/img/user02.png" alt="">
					</div>
					<span class="user-panel-logged-in-text" style="font-size: 18px;font-weight: 700;"> 
					<i class="am-icon-circle-o am-text-success tpl-user-panel-status-icon"></i>
						${username}
					</span>
				</div>
			</div>

			<!-- 菜单 -->
			<ul class="sidebar-nav">
				<li class="sidebar-nav-link"><a href="index.jsp"> <span
						class="fa-home sidebar-nav-link-logo"></span> 首页
				</a></li>
				<li class="sidebar-nav-link"><a href="tallyindex.jsp"> <span
						class="fa-pencil sidebar-nav-link-logo"></span> 记账功能
				</a></li>
				<li class="sidebar-nav-link"><a href="personalindex.jsp"> <span
						class="fa-user-circle sidebar-nav-link-logo"></span> 个人信息
				</a></li>
			</ul>
		</div>


		<!-- 内容区域 -->
		<div class="tpl-content-wrapper" style=" background: url(assets/img/1.jpg) center center / cover no-repeat fixed;">
			<div class="row-content am-cf">
				<div class="row">
					<div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
						<div class="widget am-cf">
							<div class="widget-head am-cf">
								<div class="widget-title  am-cf">记账功能</div>
							</div>
							<div class="widget-body  am-fr">
								<div class="am-u-sm-12 am-u-md-6 am-u-lg-6">
									<div class="am-form-group">
										<div class="am-btn-toolbar">
											<div class="am-btn-group am-btn-group-xs">
												<a href="showTallys" target="myframe"><span
													class="fa-bar-chart-o"> 所有记录</span></a> &nbsp&nbsp&nbsp <a
													href="addtally.jsp" target="myframe"><span
													class="fa-plus-square"> 新增</span></a> &nbsp&nbsp&nbsp <a
													href="tallyfuzzy.jsp" target="myframe"><span
													class="fa-search"> 查询</span></a>
											</div>
										</div>
									</div>
								</div>
								<!-- 										<form action="fuzzyServlet" method="post">
											<div class="am-u-sm-12 am-u-md-12 am-u-lg-3">
												<div class="am-input-group am-input-group-sm tpl-form-border-form cl-p">
													<input type="text" class="am-form-field " name="fuzzymonth">
														<span class="am-input-group-btn">
															<button target="myframe" class="am-btn  am-btn-default am-btn-success tpl-table-list-field am-icon-search"
																	type="submit"></button>
														</span>
												</div>
											</div>
										</form>	 -->


								<div class="am-btn-group am-btn-group-xs">
									<!-- 设置总值 -->
									<c:set var="debitTotal" value="${0}" />
									<c:forEach var="tallys" items="${tallyslist}">
										<c:set var="debitTotal" value="${debitTotal + tallys.debit }" />
									</c:forEach>
									总金额:${debitTotal}元
								</div>
								<div class="col-md-9">
									<iframe name="myframe" id="myframe" src="showTallys"
										width="100%" height="720px" scrolling="no"></iframe>
								</div>
								<script type="text/javascript">
									function setIframeHeight(iframe) {
										if (iframe) {
											var iframeWin = iframe.contentWindow
													|| iframe.contentDocument.parentWindow;
											if (iframeWin.document.body) {
												iframe.height = iframeWin.document.documentElement.scrollHeight
														|| iframeWin.document.body.scrollHeight;
											}
										}
									};

									window.onload = function() {
										setIframeHeight(document
												.getElementById('myframe'));
									};
								</script>

							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
	<script src="assets/js/amazeui.min.js"></script>
	<script src="assets/js/amazeui.datatables.min.js"></script>
	<script src="assets/js/dataTables.responsive.min.js"></script>
	<script src="assets/js/app.js"></script>
</body>

</html>
